package org.mymail.mail;

import javax.mail.Authenticator;
import javax.mail.Session;
import org.mymail.config.*;

public class PopMailSession
{

    public PopMailSession()
    {
        p = new PopMailProperties();
        m = new GmailMailAuthenticator();
    }

    public Session createSession()
    {
        java.util.Properties p2 = p.loadProperties();
        Session session = Session.getInstance(p2, m);
        session.setDebug(true);
        return session;
    }

    IProperties p;
    Authenticator m;
}